package com.son.dao;

import com.son.domin.Student;

import java.util.ArrayList;

public class StudentDaoImpl implements InterStudentDao{
    public static ArrayList<Student> list=new ArrayList<>();
    static {
        Student student = new Student("001","张三","23","1999-11-11");
        Student student1 = new Student("002","李四","25","1995-11-11");
        Student student2 = new Student("003","王五","21","2000-11-11");
        list.add(student);
        list.add(student1);
        list.add(student2);
    }
    @Override
    public void addStudent(Student student) {
      list.add(student);
    }

    @Override
    public int getIndex(String sid) {
        return 0;
    }

    @Override
    public void deleteStudent(String sid) {

    }

    @Override
    public void updateStudent(String sid, Student student) {

    }
    @Override
    public ArrayList<Student> findAllStudent(){
        return list;
    }
}
